#ifndef _X_DATA_DEF_H
#define _X_DATA_DEF_H
#include <unordered_map>
#include <vector>
#include <iostream>
#include <queue>
#include "Field.h"
namespace x_3rd
{
    class DataRow{
        public:
            std::vector<Field>& getDataRow() {return fields;}
            Field& operator[](const uint32_t index) {return fields[index];}
            void push(Field& field) { fields.push_back(field); }
            void print()
            {
            }
        private:
            std::vector<Field> fields;
    };

    class DataResult{
        public:
            const size_t size() {return _result.size();}
            DataRow& operator[](const size_t index){
                return _result[index];
            }
            std::vector<DataRow>& data() {return _result;}
        private:
            std::vector<DataRow> _result;
    };

    enum DATATYPE{
        DATA_INT = 0,
        DATA_STRING
    };

    typedef std::unordered_map<std::string,std::pair<DATATYPE,std::string>> DataRecord;
    typedef std::queue<std::string> Conditions;
}

#endif